<?php
require_once('Stencil.php');
output_frame_header('青年志愿者网');
?>


<link rel="stylesheet" href="style/index.css" />
 
 
<!-- 实现幻灯片式图片播放 -->
<script>
	//这一段时图片自动转换的代码
	var n = 0;
	function Mea(value) {
		n = value;

		setBigimg(value);
		setSmall(value);
	}
	function setSmall(value) {
		for ( var i = 0; i < 6; i++)
			document.getElementById("t" + i + "").className = "";
		document.getElementById("t" + value + "").className = "current";
	}
	function setBigimg(value) {
		try {
			with (slide1) {
				filters[0].Apply();//IE的滤镜应用
				for ( var i = 0; i < 6; i++)
					i == value ? children[i].style.display = "block"
							: children[i].style.display = "none";
				filters[0].play();
			}
		} catch (e) {
			var d = document.getElementById("slide1").getElementsByTagName(
					"div");
			for ( var i = 0; i < 6; i++) {
				i == value ? d[i].style.display = "block"
						: d[i].style.display = "none";
			}
		}
	}
	function clearAuto() {
		clearInterval(autoStart)
	}
	function setAuto() {
		autoStart = setInterval("auto(n)", 3000)
	}

	function auto(n) {
		n++;
		if (n > 5)
			n = 0;
		Mea(n);
	}
	setAuto();
	
</script>
	<!-- 内容板块 -->
	<div class="col">
		<!-- 左边模块* -->
		<div class="col_L">
			<div class="fpic">
				<div id="slide1">
					<div style="display: block;" class="bigPic">
						<a href="http://su.whu.edu.cn/a/wodeyingding/20101218/1479.html"
							target="_blank"> <img src="./images/news1.jpg" alt="志愿者，苦并幸福着"
							width="300" height="395"></a>
						<h3>

							<a href="http://su.whu.edu.cn/a/wodeyingding/20101218/1479.html"
								target="_blank">志愿者，苦并幸福着 </a>
						</h3>
					</div>
					<div class="bigPic" style="display: none;">
						<a href="http://smile.cityyouth.cn/show_col.aspx?cid=33&id=180821"
							target="_blank"><img src="./images/news2.jpg" alt="志愿者行动日"
							width="300" height="395"></a>
						<h3>
							<a
								href="http://smile.cityyouth.cn/show_col.aspx?cid=33&id=180821"
								target="_blank">志愿者行动日</a>
						</h3>
					</div>
					<div class="bigPic" style="display: none;">
						<a href="http://www.wxbloodbank.com/g/view.asp?ID=34"
							target="_blank"><img src="./images/news3.jpg" alt="注册成立仪式"></a>
						<h3>

							<a href="http://www.wxbloodbank.com/g/view.asp?ID=34"
								target="_blank">注册成立仪式</a>
						</h3>
					</div>
					<div class="bigPic" style="display: none;">
						<a href="http://www.people.com.cn/GB/32306/33232/7648671.html"
							target="_blank"><img src="./images/news4.jpg" alt="奥运志愿者是怎样“炼”成的"></a>
						<h3>
							<a href="http://www.people.com.cn/GB/32306/33232/7648671.html"
								target="_blank">奥运志愿者是怎样“炼”成的</a>
						</h3>
					</div>
					<div class="bigPic" style="display: none;">
						<a
							href="http://zhuanti.gqt.org.cn/2010/2010yyzyz/zyzfc/201011/t20101101_424366.htm"
							target="_blank"><img src="./images/news5.jpg" alt="我们是亚运志愿者"></a>
						<h3>
							<a
								href="http://zhuanti.gqt.org.cn/2010/2010yyzyz/zyzfc/201011/t20101101_424366.htm"
								target="_blank">我们是亚运志愿者</a>
						</h3>
					</div>
					<div class="bigPic" style="display: none;">
						<a href="http://www.wxbloodbank.com/g/view.asp?ID=34"
							target="_blank"><img src="./images/news6.jpg" alt="整齐的志愿者队伍"></a>
						<h3>
							<a href="http://www.wxbloodbank.com/g/view.asp?ID=34"
								target="_blank">整齐的志愿者队伍</a>
						</h3>

					</div>
				</div>
				<div class="btPho">
					<ul id="focuspicHandler">
						<li id="t0" onmouseover="Mea(0);" class="current">1</li>
						<li id="t1" onmouseover="Mea(1);" class="">2</li>
						<li id="t2" onmouseover="Mea(2);" class="">3</li>
						<li id="t3" onmouseover="Mea(3);" class="">4</li>
						<li id="t4" onmouseover="Mea(4);" class="">5</li>
						<li id="t5" onmouseover="Mea(5);" class="">6</li>
					</ul>
				</div>
			</div>

			<div class="space"></div>
			<!-- 左边第二块 -->

			<!-- 左边第二块 -->
			<div class="boxleft" style="border-bottom: none;">
				<div class="titleft">
					<div class="icon">
						<a href="#" target="_blank" style="color: #2b2b2b;">热点回顾</a>
					</div>
					<span class="cGray"><a href="./list.php" target="_blank">更多</a></span>
				</div>
				<div class="picTxt01" style="padding-top: 7px;">
				<?php
				require ('dbconnect.php');
				$query = "SELECT p_id, subject, message FROM page ORDER BY comment_times DESC";
				$result = mysql_query ( $query );
				$i = 1;
				while ( ($row = mysql_fetch_array ( $result, MYSQL_ASSOC )) && $i <= 2 ) {
				$message_str=substr($row['message'],0,500);
				echo <<<ROD
				     <h3>
					 <a href="view_page.php?pid={$row['p_id']}" target="_blank">{$row['subject']}</a>
					 </h3>
					 <p>
						<table>
						<td> {$message_str} <span class="cRed"><a href="view_page.php?pid={$row['p_id']}" target=\"_blank\">[详细]</a></span>
						</td></table>
					 </p>
ROD;
					$i ++;
				}
				?>	
				</div>
				<div class="clear"></div>

			</div>

		</div>
		<?php
		echo '
		<div class="col_M">
			<div class="box410">
				<div style="position: relative; height: 38px;">
					<!-- 有id -->
					<ul class="Tab02" id="rdph_ul" style="width: 400px;">
						<li class="current"><a target="_blank" >最新活动</a></li>	
					</ul>
				</div>
				<div class="Tab02_box" style="display: block;">
					<div class="space8"></div>
					<ul class="top-12">';
		$query = "SELECT p_id, subject,access_times FROM page ORDER BY dateline DESC";
		$result = mysql_query ( $query );
		$i = 1;
		while ( ($row = mysql_fetch_array ( $result, MYSQL_ASSOC )) && $i <= 20 ) {
			echo "<li class=\"li$i\" ><a target=\"_self\" href=\"view_page.php?pid={$row['p_id']}\">{$row['subject']}</a>
							<span class=\"num\">{$row['access_times']}</span></li>";
			$i ++;
		}
		echo '</ul>
					<div class="line04"></div>
				</div>
			</div>
		</div>';
		?>
		<!-- 中间结束 -->
		<!-- 右边部分 -->
		<div class="col_R">
			<!-- 第一块 -->
			<div class="box220">
				<div class="tit04">
					<img alt="论坛公告" src="./images/announcement.jpg" width="208"
						height="40">
					<map name="Map" id="Map">
						<area shape="rect" coords="37,9,96,27" href="#">
					</map>
					<div class="tip01"></div>
				</div>
				<ul class="list03" style="padding-top: 5px; padding-bottom: 6px;">
				<?php
				$query = "SELECT p_id, subject FROM page WHERE type='N'";
				$result = mysql_query ( $query );
				$i = 1;
				while ( ($row = mysql_fetch_array ( $result, MYSQL_ASSOC )) && $i <= 8 ) {
					echo "<li class=\"li$i\" ><a target=\"_self\" href=\"view_page.php?pid={$row['p_id']}\">{$row['subject']}</a></li>";
					$i ++;
				}
				?>
				</ul>
			</div>
			<div class="space"></div>
			<!-- 右边第二块 -->
			<div class="box220">
				<div class="tit04">
					<img src="./images/volunteer.jpg" alt="志愿者之星" width="208"
						height="40" border="0" usemap="#Map">
					<map name="Map" id="Map">
						<area shape="rect" coords="37,9,96,27"
							href="http://bbs.ifeng.com/list.php?blockid=10">
					</map>
					<div class="tip02"></div>
				</div>
				<div class="space5"></div>
				<div class="picTxt01"
					style="padding-top: 7px; padding-bottom: 0; position: relative; background: none;">
					<h4>
						<a target="_blank"
							href="http://bbs.ifeng.com/viewthread.php?tid=12611909"><b>第3期：DJ思琪</b></a>
					</h4>
					<div class="space10"></div>
					<a class="pic1" target="_blank"
						href="http://bbs.ifeng.com/viewthread.php?tid=12611909"> <img
						width="76" height="96" border="0" alt="第3期：DJ思琪"
						src="http://bbsfile.ifeng.com/bbsfile/cmsupload/2012-02/13891204_18e2999891374a475d0687ca9f989d83.jpg"></a>
					<p>
						其实我是来发图的，大家觉得哪张比较好，回头弄一个壁纸神马的。<span class="cRed"><a
							target="_blank"
							href="http://bbs.ifeng.com/viewthread.php?tid=12611909">[详细]</a></span>
					</p>
					<div class="tip03"></div>
				</div>
				<div class="space4"></div>
				<ul class="list03">
					<li><a href="./index.php"
						target="_blank">第2期：陈豪</a></li>
					<li><a href="./index.php"
						target="_blank">第1期：陈豪</a></li>
					<li><a href="./index.php"
						target="_blank">月度志愿者之星：陈豪</a></li>
				</ul>
				<div class="space4"></div>
			</div>
			<!-- 第三块结束 -->
		</div>

	</div>
	<div class="clear"></div>



	<?php output_frame_footer();?>